package com.aaa.doctor.feign.system;

import com.aaa.entity.Dept;
import com.aaa.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author MuChengGuo
 * @date 2023/3/27 21:07
 * Description: TODO
 **/
@FeignClient("his-open-system")
public interface UserFeign {
    @GetMapping("system/user/getByUsername/{username}")
    public User getByUsername(@PathVariable String username);

    @GetMapping("system/user/listUser")
    public List<User> getListUser();

    @PostMapping("system/user/listAllUser")
    public List<User> getListAllUser(@RequestBody Map<String, Object> map);

    @GetMapping("system/dept/getByDeptId/{deptId}")
    public Dept getByDeptId(@PathVariable Long deptId);
}
